#include "kernel/types.h"
#include "kernel/param.h"
#include "user/user.h"

int main(int argc, char **argv)
{
  if(argc < 3){
    printf("usage:\n"
    "trace <syscall_bitmask> <prog>\n");
    exit(1);
  }
  int mask = atoi(argv[1]);
  int pid = fork();
  if(pid == 0){
    trace(mask);
    exec(argv[2], argv+2);
  }else if(pid > 0){
    wait(0);
    exit(1);
  }
  exit(0);
}
